@echo off
chcp 65001
echo Starting ONVIF Manager JAR with UTF-8 encoding...

rem Set console encoding to UTF-8
set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8

rem Set JVM arguments to solve Chinese character encoding issues
set JVM_ARGS=-Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dlog4j2.formatMsgNoLookups=true -Dspring.output.ansi.enabled=never

echo Environment configured for UTF-8.
echo Starting application...

rem Start the application
java %JVM_ARGS% -jar target/onvif-manager-1.0.0.jar

echo Application stopped.
pause